package com.mylibrary.util;

import android.graphics.Bitmap;

/**
 * @author yinsujun  Created at 2016/7/28 11:23
 * 文件工具类
 */
public class AbFileUtils {
    public static Bitmap createBitmap(int width, int height, Bitmap.Config config) {
        Bitmap bitmap = null;
        try {
            bitmap = Bitmap.createBitmap(width, height, config);
        } catch (OutOfMemoryError e) {
            while (bitmap == null) {
                System.gc();
                System.runFinalization();
                bitmap = createBitmap(width, height, config);
            }
        }
        return bitmap;
    }
}
